﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Views="clr-namespace:Studio77.RuneMaster.Views"
    x:Class="Studio77.RuneMaster.Pages.ToolChoosePage"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d"
    shell:SystemTray.IsVisible="False">
	<phone:PhoneApplicationPage.Resources>
		<Style x:Key="ButtonStyle1" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Pressed">
										<Storyboard>
											<DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="3" Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="contentPresenter" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ColorAnimation Duration="0" To="#FFA0A0A0" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[2].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<DoubleAnimation Duration="0" To="0.017" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Offset)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FFF0F0F0" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
											<ColorAnimation Duration="0" To="#FF959595" Storyboard.TargetProperty="(Border.Background).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="border" d:IsOptimized="True"/>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="MouseOver"/>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Border x:Name="border" BorderBrush="White" BorderThickness="2" CornerRadius="10" RenderTransformOrigin="0.5,0.5">
								<Border.RenderTransform>
									<CompositeTransform/>
								</Border.RenderTransform>
								<Border.Background>
									<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
										<GradientStop Color="#FFF17272" Offset="0"/>
										<GradientStop Color="#FFDE2A2A" Offset="1"/>
										<GradientStop Color="#FF8F3B3B" Offset="0.19"/>
									</LinearGradientBrush>
								</Border.Background>
							</Border>
							<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RenderTransformOrigin="0.5,0.5">
								<ContentPresenter.RenderTransform>
									<CompositeTransform/>
								</ContentPresenter.RenderTransform>
							</ContentPresenter>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</phone:PhoneApplicationPage.Resources>

	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>

    <!--LayoutRoot 是包含所有页面内容的根网格-->
    <Viewbox>
		<Grid x:Name="LayoutRoot" Background="Transparent" Height="800" Width="480">
			<Image Source="/Images/toolsbg.png" Stretch="Fill" d:IsLocked="True"/>
			<Border BorderBrush="White" BorderThickness="1" HorizontalAlignment="Center" Height="519" Margin="0,150,0,0" VerticalAlignment="Top" Width="361" CornerRadius="5" Background="#33FFFFFF">
				<Grid>
					<TextBlock x:Name="txtTotalG" TextWrapping="Wrap" Text="10000 G" TextAlignment="Center" Foreground="#FFFF9C00" FontSize="26.667" VerticalAlignment="Top" FontFamily="Segoe WP Semibold"/>
					<Path Data="M17.6667,40 L335.794,40" Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="1" Margin="0,40,0,0" Stretch="Fill" Stroke="#FFC9C9C9" UseLayoutRounding="False" VerticalAlignment="Top" Width="319.127"/>
					<Path Data="M17.6667,40 L335.794,40" Fill="#FFF4F4F5" HorizontalAlignment="Center" Height="1" Margin="0,195,0,0" Stretch="Fill" Stroke="#FFC9C9C9" UseLayoutRounding="False" VerticalAlignment="Top" Width="319.128"/>
					<Grid HorizontalAlignment="Left" Height="144" Margin="20,46,0,0" VerticalAlignment="Top" Width="319" Background="#19FFFFFF">
						<TextBlock x:Name="txtToolName" HorizontalAlignment="Left" TextWrapping="Wrap" Text="Tool Name" VerticalAlignment="Top" FontSize="18.667" Margin="5,1,0,0" Foreground="White"/>
						<TextBlock x:Name="txtToolCount" HorizontalAlignment="Right" Margin="0,1,3,0" TextWrapping="Wrap" Text="(Pack)" VerticalAlignment="Top" FontSize="18.667" Foreground="White"/>
						<TextBlock x:Name="txtToolDescribe" HorizontalAlignment="Left" Height="89" Margin="5,31,0,0" TextWrapping="Wrap" Text="Please tap these tools to show tool description." VerticalAlignment="Top" Width="311" FontSize="16" Foreground="White"/>
						<TextBlock x:Name="txtToolCost" HorizontalAlignment="Right" Margin="0,117,8,0" TextWrapping="Wrap" Text="Cost" VerticalAlignment="Top" FontSize="18.667" Foreground="Yellow"/>
					</Grid>
					<StackPanel Margin="0,215,0,0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Top">
						<StackPanel Orientation="Vertical" VerticalAlignment="Top" Width="61">
							<Views:ToolItem x:Name="toolAdd500" ToolTypeValue="1" HorizontalAlignment="Left" Height="61" VerticalAlignment="Top" Width="61"/>
							<Views:ToolItem x:Name="toolScore2" ToolTypeValue="3" HorizontalAlignment="Left" Height="61" VerticalAlignment="Top" Width="61" Margin="0,15,0,0"/>
						</StackPanel>
						<StackPanel Orientation="Vertical" VerticalAlignment="Top" Width="61" Margin="30,0,0,0">
							<Views:ToolItem x:Name="toolReset" ToolTypeValue="2" HorizontalAlignment="Left" Height="61" VerticalAlignment="Top" Width="61"/>
							<Views:ToolItem x:Name="toolSpirit2" ToolTypeValue="6" HorizontalAlignment="Left" Height="61" VerticalAlignment="Top" Width="61" Margin="0,15,0,0"/>
						</StackPanel>
						<StackPanel Orientation="Vertical" VerticalAlignment="Top" Width="61" Margin="30,0,0,0">
							<Views:ToolItem x:Name="toolCollSpirit" ToolTypeValue="4" HorizontalAlignment="Left" Height="61" VerticalAlignment="Top" Width="61"/>
							<Views:ToolItem x:Name="toolAddSpirit" ToolTypeValue="5" HorizontalAlignment="Left" Height="61" VerticalAlignment="Top" Width="61" Margin="0,15,0,0"/>
						</StackPanel>
					</StackPanel>
					<Border BorderBrush="Black" BorderThickness="1" HorizontalAlignment="Center" Height="80" Margin="20,379,20,0" VerticalAlignment="Top" Width="319" CornerRadius="5" Background="#4C000000">
						<Grid>
							<Grid.ColumnDefinitions>
								<ColumnDefinition/>
								<ColumnDefinition/>
								<ColumnDefinition/>
								<ColumnDefinition/>
							</Grid.ColumnDefinitions>
							<Rectangle HorizontalAlignment="Center" Height="66" Stroke="White" VerticalAlignment="Center" Width="66" Fill="#FF6C6C6C" RadiusX="4" RadiusY="4"/>
							<Rectangle HorizontalAlignment="Center" Height="66" Stroke="White" VerticalAlignment="Center" Width="66" Fill="#FF6C6C6C" RadiusX="4" RadiusY="4" Grid.Column="1"/>
							<Rectangle HorizontalAlignment="Center" Height="66" Stroke="White" VerticalAlignment="Center" Width="66" Fill="#FF6C6C6C" RadiusX="4" RadiusY="4" Grid.Column="2"/>
							<Rectangle HorizontalAlignment="Center" Height="66" Stroke="White" VerticalAlignment="Center" Width="66" Fill="#FF6C6C6C" RadiusX="4" RadiusY="4" Grid.Column="3"/>
							<Views:ToolItem x:Name="selectTool1" IsUsedItem="True" ToolTypeValue="1" HorizontalAlignment="Center" Height="61" VerticalAlignment="Center" Width="61" Margin="0" Visibility="Collapsed"/>
                            <Views:ToolItem x:Name="selectTool2" IsUsedItem="True" ToolTypeValue="1" HorizontalAlignment="Center" Height="61" VerticalAlignment="Center" Width="61" Grid.Column="1" Visibility="Collapsed"/>
                            <Views:ToolItem x:Name="selectTool3" IsUsedItem="True" ToolTypeValue="1" HorizontalAlignment="Center" Height="61" VerticalAlignment="Center" Width="61" Grid.Column="2" Visibility="Collapsed"/>
                            <Views:ToolItem x:Name="selectTool4" IsUsedItem="True" ToolTypeValue="1" HorizontalAlignment="Center" Height="61" VerticalAlignment="Center" Width="61" Grid.Column="3" Visibility="Collapsed"/>
						</Grid>
					</Border>
					<TextBlock x:Name="txtTotalCostG" HorizontalAlignment="Right" Margin="0,464,20,0" TextWrapping="Wrap" Text="0 G" VerticalAlignment="Top" Foreground="#FFFFF300"/>
					<TextBlock HorizontalAlignment="Left" Margin="20,358,0,0" TextWrapping="Wrap" Text="Tool Slot" VerticalAlignment="Top" FontSize="16" Foreground="White"/>
					<TextBlock x:Name="txtWaring" HorizontalAlignment="Center" Margin="0,0,0,3" TextWrapping="Wrap" Text="You can not afford to buy these tools" VerticalAlignment="Bottom" Foreground="Red"/>
				</Grid>
			</Border>
			<Image x:Name="imgGameModeEasy" Margin="67,123,334,653" Source="/Images/easy.png"/>
			<TextBlock x:Name="txtStageName" HorizontalAlignment="Right" Margin="0,114,66,0" TextWrapping="Wrap" Text="STAGE 1" VerticalAlignment="Top" FontSize="26.667" FontFamily="Segoe WP Semibold" Foreground="#FFFFF300"/>
			<Image x:Name="imgGameModeNormal" Margin="67,123,280,653" Source="/Images/normal.png" Visibility="Collapsed"/>
			<Image x:Name="imgGameModeHard" Margin="67,123,325,653" Source="/Images/hard.png" Visibility="Collapsed"/>
			<Button Click="btnStartStage_Click_1" x:Name="btnStartStage" Content="START STAGE!" HorizontalAlignment="Left" Height="56" Margin="108,708,0,0" Style="{StaticResource ButtonStyle1}" VerticalAlignment="Top" Width="266" Foreground="White"/>
        
		</Grid>

	</Viewbox>

</phone:PhoneApplicationPage>